﻿
using System;

namespace PSE.Framework.Communication.Messages.Adapters
{
    /// <summary>
    /// Argumento de eventos de mensagem
    /// </summary>
    public class StreamOpenedEventArgs : MessageEventArgs
    {
        /// <summary>
        /// Construtor que preenche o Action
        /// </summary>
        /// <param name="action">Action da mensagem</param>
        public StreamOpenedEventArgs(string action)
            : base(action)
        {
            _messageCount = -1;
        }

        /// <summary>
        /// Construtor que preenche o Action
        /// </summary>
        /// <param name="action">Action da mensagem</param>
        /// <param name="messageCount">Número de mensagens</param>
        public StreamOpenedEventArgs(string action,int messageCount)
            : base(action)
        {
            _messageCount = messageCount;
        }

        /// <summary>
        /// Construtor que preenche o Action e Message
        /// </summary>
        /// <param name="action">Action da mensagem</param> 
        /// <param name="message">Mensagem</param>
        public StreamOpenedEventArgs(string action, object message)
            : base(action, message)
        {
            _messageCount = -1;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="action">Action da mensagem</param> 
        /// <param name="message">Mensagem</param>
        /// <param name="messageCount">Número de mensagens</param>
        public StreamOpenedEventArgs(string action, object message, int messageCount)
            :this(action,message)
        {
            this._messageCount = messageCount;
        }

        private int _messageCount;
        /// <summary>
        /// Número de linhas
        /// </summary>
        public int MessageCount
        {
            get { return _messageCount; }
            set { _messageCount = value; }
        }

    }//end MessageEventArgs

}